package cn.anecansaitin.industrialization_expansion.common;

import cn.anecansaitin.industrialization_expansion.ModConstant;
import net.minecraft.enchantment.EnchantmentType;
import net.minecraft.util.text.TextFormatting;
import net.minecraft.util.text.TranslationTextComponent;
import net.minecraftforge.common.ToolType;

public class TranslationText {
    public static final TranslationTextComponent MODIFIED = (TranslationTextComponent) getToolName("modified").withStyle(TextFormatting.AQUA);

    public static TranslationTextComponent getToolType(String name) {
        return new TranslationTextComponent(ModConstant.MOD_ID + ".tool_type." + name);
    }

    public static TranslationTextComponent getToolType(ToolType type) {
        return getToolType(type.getName());
    }

    public static TranslationTextComponent getToolName(String name) {
        return new TranslationTextComponent(ModConstant.MOD_ID + ".tool_name." + name);
    }

    public static TranslationTextComponent getToolTip(String tip) {
        return new TranslationTextComponent("text." + ModConstant.MOD_ID + ".modified_tool." + tip);
    }

    public static TranslationTextComponent getModuleType(String name) {
        return new TranslationTextComponent(ModConstant.MOD_ID + ".module_type." + name);
    }

    public static TranslationTextComponent getModuleType(ToolModuleType type) {
        return getModuleType(type.getName());
    }

    public static TranslationTextComponent getEnchantmentType(EnchantmentType type) {
        return new TranslationTextComponent(ModConstant.MOD_ID + ".enchantment_type." + type.name());
    }
}
